<!DOCTYPE html>
<html>
<#header />
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">涉讼业务系统</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    欢迎登录，${user.nickname}
            </li>
            <li class="layui-nav-item"><a href="/index/logout.btl">注销</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul id="nav" class="layui-nav layui-nav-tree"  lay-filter="test">
                @for(menu in menus){
                @if(menuLP.first){
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">${menu.menuText}</a>
                    <dl class="layui-nav-child">
                        @for(submenu in menu.subMenu){
                        <dd><a href="#" ddID="${submenu.id}" name="${submenu.menuUrl}">${submenu.menuText}</a></dd>
                        @}
                    </dl>
                </li>
                @}else{
                <li class="layui-nav-item">
                    <a class="" href="javascript:;">${menu.menuText}</a>
                    <dl class="layui-nav-child">
                        @for(submenu in menu.subMenu){
                        <dd><a href="#" ddID="${submenu.id}" name="${submenu.menuUrl}">${submenu.menuText}</a></dd>
                        @}
                    </dl>
                </li>
                @}

                @}
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div>
            <div id="content" class="layui-tab layui-nomargin" lay-filter="contentFrame" lay-allowClose="true">
                <ul class="layui-tab-title">
                    <li lay-id="14" class="layui-this">用户管理</li>
                </ul>
                <div class="layui-tab-content contentFrame">
                    <div class="layui-tab-item layui-show">
                        <iframe frameborder="0" width="100%" src="/user/mgr.btl" scrolling="yes" ></iframe>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © 交易二部
    </div>
</div>

<script>
    //JavaScript代码区域
    layui.use(['element','jquery'], function(){
        var element = layui.element;
        var $ = layui.$;
        $("#nav").find("a[ddID]").on("click",function(){
            if($("[lay-id="+$(this).attr("ddID")+"]")[0]){
                element.tabChange('contentFrame',$(this).attr("ddID"));
            }else{
                element.tabAdd('contentFrame',{
                    title:$(this).text(),
                    content:'<iframe  frameborder="0" scrolling="yes" src="'+$(this).attr("name")+'"></iframe>',
                    id:$(this).attr("ddID")
                });
                element.tabChange('contentFrame',''+$(this).attr("ddID"));
            }
        });
    });
</script>
</body>
</html>